package com.uzai.console.enums;

/**
 * 淘宝订单拉取类型
 * @Auther: liuqi
 * @Date: 2021/8/19 11:22
 * @Description:
 */
public enum OrderPullTbTypeEnum {

    ORDER_CREATE(1,"创建时间"),
    ORDER_PAY(2,"付款时间"),
    ORDER_SETTING(3,"结算时间"),

    ;

    private Integer type;
    private String desc;

    OrderPullTbTypeEnum(Integer type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static OrderPullTbTypeEnum getByType(Integer type) {
        if (type == null) {
            return null;
        }
        for (OrderPullTbTypeEnum orderPullTbRefundTypeEnum: OrderPullTbTypeEnum.values()) {
            if (orderPullTbRefundTypeEnum.getType().intValue() == type.intValue()) {
                return orderPullTbRefundTypeEnum;
            }
        }
        return null;
    }
}
